Microsoft VBScript Professional Projects by by Jerry Lee Ford Jr

Microsoft VBScript Professional Projects by by Jerry Lee Ford Jr

Author:by Jerry Lee Ford, Jr. [by Jerry Lee Ford, Jr.]
Language: rus
Format: epub
ISBN: 1592000568
Publisher: Course Technology
Published: 0101-01-01T00:00:00+00:00


Creating Logic to Limit When the Script Can Execute

Molly plans to create a single script that will control the execution of both her report and log file analyzers and an archive management script that needs to be executed on the first day of each month. Molly plans to use the built-in VBScript Day() and Date() functions to ensure that the archive management script, which is named ArchiveManager.vbs, will only execute on the first day of each month. This way Molly can write a single script that can handle scheduling the execution of the MstrSched.vbs every day to run the report and log analyzer scripts, and still accommodate the monthly execution of the archive management script.

The syntax of the Date() function, which returns the current system date, is outlined below.

Date()

When executed, it returns the current system date in the form of mm/dd/yyyy, as demonstrated below.

strTodaysDate = Date() MsgBox strTodaysDate

When executed, the previous VBScript statement displays a pop-up dialog box, as demonstrated in Figure 19.3.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.